/**********************************************************************
 * SailmiPIM - modular cross-platform feature Personal Information Manager Tools.
 * Copyright(C) 2006-2014  Georg Rudoy
 *
 * Distributed under the Boost Software License, Version 1.0.
 *(See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
 **********************************************************************/

#pragma once

#include <QObject>
#include <sailmipim/iinfo.h>

class QDBusInterface;

namespace SailmiPIM
{
namespace Loaders
{
	class InfoProxy : public QObject
					, public IInfo
	{
		Q_OBJECT
		Q_INTERFACES(IInfo)
		const QString Service_;
		std::shared_ptr<QDBusInterface> IFace_;
		std::shared_ptr<QDBusInterface> Info_;
	public:
		explicit InfoProxy(const QString& service);
		void SetProxy(ICoreProxy_ptr proxy);
		void SetPluginInstance(QObject*);
		void Init(ICoreProxy_ptr proxy);
		void SecondInit();
		void Release();
        bool IsCore() const;
		QByteArray GetUniqueID() const;
		QString GetName() const;
		QString GetInfo() const;
		QIcon GetIcon() const;
        const ICoreProxy_ptr& GetProxy();
	};
}
}
